import React, { Component } from 'react';
import {StyleSheet, View} from "react-native";
import ScrollableTabView, {DefaultTabBar, ScrollableTabBar} from "react-native-scrollable-tab-view";
import OrderItem from "../order-item/OrderItem";
import {i18n} from "../../../utils/locales/i18n";



type Props = {};
export default class OrderAll extends Component<Props> {
	constructor(Props) {
		super(Props)
	}
	render() {
		return (
			<View style={styles.wrapper}>
				<ScrollableTabView
					tabBarUnderlineStyle={{backgroundColor: '#ff7807', height: 1}}
					tabBarActiveTextColor='#ff7807'
					tabBarTextStyle={{fontSize: 15}}
					tabBarInactiveTextColor = '#808080'
					renderTabBar={() => <DefaultTabBar style={{borderWidth: 0}} />}
				>
					<OrderItem tabLabel={i18n.t('i70')} toBuy={this.props.toBuy} toSell={this.props.toSell} type={0} state={1} />
					<OrderItem tabLabel={i18n.t('i71')} toBuy={this.props.toBuy} toSell={this.props.toSell} type={0} state={2} />
					<OrderItem tabLabel={i18n.t('i72')} toBuy={this.props.toBuy} toSell={this.props.toSell} type={0} state={3} />
					<OrderItem tabLabel={i18n.t('i73')} toBuy={this.props.toBuy} toSell={this.props.toSell} type={0} state={4} />
				</ScrollableTabView>
			</View>
		)
	}

}

const styles = StyleSheet.create({
	container: {
		flex: 1,
		justifyContent: 'center',
		alignItems: 'center',
		backgroundColor: '#f2f2f2',
	},
	header: {
		height: 90,
		paddingTop: 20,
		width: '100%',
		backgroundColor: '#fff'
	},
	wrapper: {
		flex: 1,
		width: '95%',
		borderRadius: 10,
		backgroundColor: '#fff',
		marginTop: 10
	}
});
